﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Token = PrattParsing.Token;

namespace sapphirelang.Parsing
{
    [System.Diagnostics.DebuggerNonUserCode]
    static class TokenType
    {
        public const int 
            IDENT = 0,     // any alphanumeric name
            //KEYWORD = 1,   // only certain identifiers
            OPERATOR = 1,  // any number of special characters
            GROUPING = 2,  // (){}[]
            STRING = 3,    // a single-quoted or double-quoted string literal
            INTEGER = 4,   // an integer literal (unsigned; any leading '-' is handled as an operator)
            DOUBLE = 5,    // a number literal (unsigned; ...)
            SYMBOL = 6,    // :ident  -- like Ruby
            SEMICOLON = 7; // you can probably figure this out...

        public static void Init()
        {
            Token.TYPE_NAMES[IDENT] = "identifier";
            //Token.TYPE_NAMES[KEYWORD] = "keyword";
            Token.TYPE_NAMES[OPERATOR] = "operator";
            Token.TYPE_NAMES[GROUPING] = "group symbol";
            Token.TYPE_NAMES[STRING] = "string";
            Token.TYPE_NAMES[INTEGER] = "integer";
            Token.TYPE_NAMES[DOUBLE] = "number";
            Token.TYPE_NAMES[SYMBOL] = "symbol";
            Token.TYPE_NAMES[SEMICOLON] = "semicolon";
        }
    }
}
